Cho biểu thức:
\(C=\left(x-\dfrac{4xy}{x+y}+y\right):\left(\dfrac{x}{x+y}+\dfrac{y}{y-x}+\dfrac{2xy}{x^2-y^2}\right)\left(x\ne\pm y\right)\)
1. Rút gọn biểu thức \(C\) ;
2. Khi cho \(\left(x^2-y^2\right)\cdot C=-8\), hãy tính giá trị của biểu thức:
\(M=x^2\left(x+1\right)-y^2\left(y-1\right)-3xy\left(x-y+1\right)+xy\).